/** \file srg_dirver.h Contains the declaration for functions and variables of the Shift Register Driver component.
*/
#ifndef SRG_DRIVER_H
#define SRG_DRIVER_H

#include <avr/io.h>
#include "loc_types.h"


/************************/
/* Configuration Section*/
/************************/

/** This links to the port where the Shift register's controls are connected.
* This is PORTD.
*/
#define SRG_u8CONTROL_PORT          PORTD

#define SRG_u8CONTROL_PORT_DDR      DDRD

/** This links to the port where the screen's data are connected.
* This is PORTA from PA0 toPA6.
*/
#define SRG_u8DATA_PORT             PORTA

#define SRG_u8DATA_PORT_DDR         DDRA

/** This macro is the pin connected to the Shift register clock.
*/
#define SRG_bSCK                    PD4          

#define SRG_bSCK_DDR                DDD4

/** This macro is the pin connected to the storage register clock.
*/
#define SRG_bRCK                    PD5

#define SRG_bRCK_DDR                DDD5

/** This macro is the pin connected to the serial input of the shift register.
*/
#define SRG_bSI                     PD6

#define SRG_bSI_DDR                 DDD6


/***********************/
/* Exported Constants. */
/***********************/




/*****************/
/* Exported Types*/
/*****************/



/*********************/
/* External Functions*/
/*********************/

/** Initializes the shift register's internal variables and pins.
*/
extern void SRG_vidInit(void);

/** Puts the data to screen.
* \param u8Data the data byte to be set to screen.
* \param bFirst Set this variable to true if this is the first byte on the screen.
*/
extern void SRG_vidPutData(u8 u8Data, TYP_tu8Bool bFirst);

#endif /*SRG_DRIVER_H*/
